# encoding: utf-8
from flask_marshmallow import base_fields
from app.modules.common.parameters import BaseParameters, Parameters


class SwitchParameters(BaseParameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
        missing = None
    )
    entrance_types = base_fields.String(
        required = False,
        missing = None
    )
    status = base_fields.String(
        required = True,
        enum = ['GA', 'GB', 'GNONE']
    )
    app_name = base_fields.String(
        required = False,
        missing = None
    )


class AutoSwitchParameters(Parameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
        missing = None
    )
    status = base_fields.String(
        required = True,
        enum = ['GA', 'GB', 'GNONE']
    )
    group = base_fields.String(
        required = True,
        enum = ['A', 'B']
    )


class GetSwitchStatusParameters(BaseParameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
        missing = None
    )


class CheckParameters(BaseParameters):
    env_name = base_fields.String(
        required = True,
    )
    zone_code = base_fields.String(
        required = True,
    )
